<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <script  src="js/jquery.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <div class="layui-form-item">
                <label for="name" class="layui-form-label">
                    <span class="x-red">*</span>要改成什么分类名
                </label>
                <div class="layui-input-inline">
                    <input type="hidden" name="sortsid">
                    <input type="text" id="name" name="sortsname" required="" lay-verify="required"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <input  class="layui-btn" type="submit" value="修改"/>
        </form>
    </div>
</div>
<script>
    var url = document.URL;
    var u=url.split("?")[1];
    var r=u.split("=")[1];
    console.log(r);
    $(function () {
        $.ajax({
            url:"/sorts/UpdateSortsServlet",
            type:"post",
            dataType:"json",
            async:false,
            data:{
                "sortsid":"r"
            },
            success:function (res) {
                console.log(res);
            }
        })
    })
</script>
</body>

</html>
